// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

export component TestCase  {
    in-out property<string> p1: "hello";
    in-out property<string> p2: "fox:🦊";
    in-out property<string> p3: "with\"quote\\\"\u{8}";
    in-out property<bool> e1: p2 == "fox:🦊";
    in-out property<bool> e2: p2 == "fox:🦍";
    in-out property<int> big-number: 800000005;

    // conversion from float
    in property<float> value: 98.7654321;
    in property<float> increment: 0.1;
    out property <string> converted_value: round(value * 100)/100;
    out property <string> ten_dot_one: 10 + increment;
    out property <bool> test: e1 && !e2 && converted_value == "98.77" && ten_dot_one == "10.1" && big-number == "800000005";
}

/*

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert_eq(instance.get_p1(), "hello");
assert_eq(instance.get_p2(), "fox:🦊");
assert_eq(instance.get_p3(), "with\"quote\\\"\x08");
assert(instance.get_e1());
assert(!instance.get_e2());
assert(instance.get_test());
```

```rust
let instance = TestCase::new().unwrap();
assert_eq!(instance.get_p1(), "hello");
assert_eq!(instance.get_p2(), "fox:🦊");
assert_eq!(instance.get_p3(), "with\"quote\\\"\u{8}");
assert!(instance.get_e1());
assert!(!instance.get_e2());
assert!(instance.get_test());
```

```js
var instance = new slint.TestCase({});
assert.equal(instance.p1, "hello");
assert.equal(instance.p2, "fox:🦊");
assert.equal(instance.p3, "with\"quote\\\"\u0008");
assert(instance.e1);
assert(!instance.e2);
assert(instance.test);
```

*/
